'use strict'

const config = require('../config/config.ssr')

module.exports = app => {
  const { router, controller } = app
  config.routes.map(route => {
    console.log('routes '+JSON.stringify(route));
    router.get(`${route.path}`, controller[route.controller][route.handler])
  });
  
  app.router.post('/addgold', controller.page.addGold);
  app.router.post('/batchaddgold', controller.page.batchAddGold);
  app.router.post('/batchcreateuser', controller.page.batchCreaterUser);
}
